#nullable enable
using Godot;
using AndroidUnevenRoadGame.Game;

namespace AndroidUnevenRoadGame.UI
{
    public partial class DefeatScene : Control
    {
        [Export] private Button? _returnButton;

        public override void _Ready()
        {
            _returnButton ??= GetNode<Button>("Center/ReturnButton");
            _returnButton!.Pressed += OnReturnPressed;
        }

        private void OnReturnPressed()
        {
            GameRoot.Instance.ChangeState(GameRoot.GameState.MainMenu);
        }
    }
}

